home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / system / mail / mailhand / metamail.z / metamail / fonts / shownonascii < prev   
Encoding:
Text File  |  1993-03-23  |  1.2 KB  |  45 lines

  1. #!/bin/csh -f
  2. set MYFONTDIR=/other/home/mguerra/metamail/fonts
  3.  
  4. set CHARSET=$1
  5. shift
  6. if ("$1" == "-e") then
  7.     shift
  8.     set CMD="$*"
  9.     set RIGHTTERMCMD="$*"
  10. else
  11.     set CMD="more $* /dev/null"
  12.     set RIGHTTERMCMD="more $*"
  13. endif
  14. if ($?MM_CHARSET) then
  15.     if ($MM_CHARSET == $CHARSET) then
  16.     $RIGHTTERMCMD
  17.     exit
  18.     endif
  19. endif
  20. if (! -d $MYFONTDIR) then
  21.     echo This message contains non-ASCII text, but the $CHARSET font
  22.     echo has not yet been installed on this machine.  What follows
  23.     echo "may be partially unreadable, but the English (ASCII) parts"
  24.     echo "should still be readable."
  25.     cat $*
  26.     exit 0
  27. endif
  28.  
  29. if (! $?DISPLAY) then
  30.     echo This message contains non-ASCII text, which can only be displayed
  31.     echo properly if you are running X11.  What follows
  32.     echo "may be partially unreadable, but the English (ASCII) parts"
  33.     echo "should still be readable."
  34.     cat $*
  35.     exit 0
  36. endif
  37. xset +fp $MYFONTDIR
  38. echo Running xterm to display text in $CHARSET, please wait...
  39. unsetenv MM_NOTTTY
  40.  
  41. # The following line might work better on IBM RT and other machines that 
  42. #      think it smart inhibit 8 bit chars in xterms.
  43. # xterm -fn $CHARSET -tm litout -e $CMD
  44. xterm -fn $CHARSET -e $CMD
  45.